//
//  ViewController.m
//  NavigationBarTest
//
//  Created by Clavis on 2019/2/14.
//  Copyright © 2019 Clavis. All rights reserved.
//

#import "ViewController.h"
#import "SEGPGCNaviHeadView.h"
#import <Masonry.h>

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    self.title = @"VC";
    self.navigationController.navigationBar.barTintColor = UIColor.purpleColor;
    
//    self.navigationController.navigationBar.prefersLargeTitles = YES;
    
    self.nameLabel.text = @"VC";
    
    
//    UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
//    titleView.backgroundColor = UIColor.redColor;
    
    SEGPGCNaviHeadView *headView = [[SEGPGCNaviHeadView alloc] initWithFrame:CGRectMake(0, 0, 100, 30)];
    headView.backgroundColor = UIColor.redColor;
    
    [headView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.width.mas_equalTo(120);
        make.height.mas_equalTo(30);
    }];
    
    self.navigationItem.titleView = headView;
}


@end
